export default ({ $axios }, inject) => {
    // 生成订单
    inject('createOrder', () => {
        return $axios.get('/member/order/pre')
    })
    // 提交订单
    inject('submitOrder', (data) => {
        return $axios.post('/member/order', data)
    })
    // 获取订单详情
    inject('getOrderDetail', (orderId) => {
        return $axios.get(`/member/order/${orderId}`)
    })
    // 获取订单列表
    inject('getOrderList', (params) => {
        return $axios.get('/member/order', { params })
    })

}